﻿using System;
using System.Collections.Generic;
using System.Data.Common;
using System.Text;
using System.Text.RegularExpressions;

namespace Tilver.Data.DataPager
{
    /// <summary>
    /// 分页接口
    /// </summary>
    public interface IPager
    {
        /// <summary>
        /// 获取总记录数
        /// </summary>
        /// <returns></returns>
        long GetRecordCount();
        /// <summary>
        /// 获取分页数据
        /// </summary>
        /// <param name="pageIndex"></param>
        /// <returns></returns>
        DbDataReader GetPageData(long pageIndex);
        ///// <summary>
        ///// 添加分页sql语句参数
        ///// </summary>
        ///// <param name="name">参数名称</param>
        ///// <param name="value">参数值</param>
        ///// <param name="dbType">参数类型</param>
        ///// <param name="size">参数大小</param>
        //void AddInParameter(string name, object value = null, DbType dbType = DbType.String, int size = 0);
        /// <summary>
        /// 添加分页sql语句参数
        /// </summary>
        /// <param name="paras"></param>
        void AddParameters(IList<DbParameter> paras);
    }
}
